package com.naiterui.ehp.bs.cms.modules.followup.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.naiterui.ehp.bp.bo.emr.QaPageBO;
import com.naiterui.ehp.bp.bo.followup.DrFollowUpRecordFormBO;
import com.naiterui.ehp.bp.bo.followup.FollowUpFormBO;
import com.naiterui.ehp.bp.bo.form.FormDrawingBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.cms.common.vo.PageParamsVO;
import com.naiterui.ehp.bs.cms.common.vo.PageVO;
import com.naiterui.ehp.bs.cms.modules.followup.entity.FollowUpForm;
import com.naiterui.ehp.bs.cms.modules.followup.vo.FollowUpFormDetailVO;
import com.naiterui.ehp.bs.cms.modules.followup.vo.FollowUpFormVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author yangfuya
 * @since 2022/1/5
 */
public interface IFollowUpFormService extends IService<FollowUpForm> {

    /**
     * 分页查询表单列表
     *
     * @param pageParamsVO
     * @param followUpFormVO
     * @return
     */
    PageVO<FollowUpFormVO> queryPage(PageParamsVO pageParamsVO, FollowUpFormVO followUpFormVO);

    /**
     * 保存修改随访表单
     *
     * @param followUpFormBO
     * @throws BusinessException
     */
    void edit(FollowUpFormBO followUpFormBO) throws BusinessException;

    /**
     * 随访表单详情
     *
     * @param id
     * @return
     * @throws BusinessException
     */
    FollowUpFormDetailVO getById(Long id) throws BusinessException;

    /**
     * 上传表单文件
     *
     * @param file
     * @return
     * @throws BusinessException
     */
    String upload(MultipartFile file) throws BusinessException;

    /**
     * 获取表单内容
     *
     * @param formId
     * @return
     * @throws BusinessException
     */
    List<FormDrawingBO> getDesignForm(String formId) throws BusinessException;

    /**
     * 根据id删除随访表单
     *
     * @param id
     * @throws BusinessException
     */
    void deleteById(Long id) throws BusinessException;

    /**
     * 修改随访表单状态
     *
     * @param id
     * @param status
     * @throws BusinessException
     */
    void updateStatus(Long id, Integer status) throws BusinessException;

    QaPageBO qaRecord(Long qaId, String name, Integer fillingStatus, PageParamsVO pageParamsVO) throws BusinessException;

    byte[] qaRecordExport(Long qaId, String name, Integer fillingStatus, PageParamsVO pageParamsVO) throws BusinessException;

    DrFollowUpRecordFormBO qaRecordDetail(Long followUpRecordFormId) throws BusinessException;
}
